#include <stdio.h>

int main()
{
    int e;
    float ec = 0.53;
    scanf("%d",&e);
    if(e >= 0&&e <= 50){
        ec = ec * e;
        printf("cost = %.2f\n",ec);
    }
    else if(e > 50){
        ec = 50 * ec +(e - 50)*(ec + 0.05);
        printf("cost = %.2f\n",ec);
    }
    else{
        printf("Invalid Value!\n");
    }

    return 0;
}